"""
LLM4CP配置文件
包含模型训练相关的所有配置参数
"""

import torch
import os

class SimpleLLM4CPConfig:
    """简化的LLM4CP配置"""
    def __init__(self):
        # 基础参数
        self.d_model = 512  # 减小模型大小
        self.d_ff = 1024
        self.n_heads = 8
        self.n_layers = 4
        self.pred_len = 8
        self.prev_len = 16
        
        # 信道参数
        self.K = 48
        self.UQh = 1
        self.UQv = 1  
        self.BQh = 1
        self.BQv = 1
        self.enc_in = 96  # K * UQh * UQv * BQh * BQv * 2
        
        # 探头参数
        self.n_probes = 16
        self.total_probes = 481
        
        # 训练参数 - 进一步RMSE优化
        self.batch_size = 8   # 减小批次以提高梯度质量
        self.learning_rate = 0.003  # 进一步提高学习率
        self.epochs = 50  # 更多训练轮数
        self.patience = 12  # 更大耐心值
        self.warmup_epochs = 8  # 添加预热期
        
        # 损失权重 - 激进RMSE优化
        self.spatial_weight = 50.0  # 激进增加空间权重
        self.channel_weight = 1.0
        self.probe_weight = 0.02  # 进一步减少探头权重
        self.consistency_weight = 8.0  # 大幅增加一致性权重
        self.smoothness_weight = 3.0  # 添加平滑性权重
        
        # 数据路径
        self.spatial_data_dir = "dataset/dy"
        self.phasecha_path = "dataset/dataset/phasecha.mat"
        
        # 设备
        self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') 